# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import datetime

from django.db import models

# Create your models here.


class Home_Blog(models.Model):
    home_blog_title = models.CharField(max_length=30, verbose_name=u'新闻标题')
    home_blog_desc = models.CharField(max_length=100, verbose_name=u'新闻简介')
    home_blog_url = models.URLField(max_length=50, verbose_name=u'新闻地址')
    home_blog_comments = models.IntegerField(verbose_name=u'新闻评论数')
    home_blog_author = models.CharField(max_length=10, verbose_name=u'新闻作者')
    home_blog_create_time = models.DateField(default=datetime.now, verbose_name=u'新闻创建时间')

    class Meta:
        verbose_name = u'主页博客条目'
        verbose_name_plural = verbose_name

    def __unicode__(self):
        return self.home_blog_title
